﻿package cn.gdpu.service.impl;

import java.util.List;

import cn.gdpu.dao.impl.*;

import cn.gdpu.service.*;

import cn.gdpu.vo.*;

public class GoodsTypeServiceImpl extends BaseServiceImpl<GoodsType, Integer, GoodsTypeDaoImpl> implements GoodsTypeService<GoodsType, Integer> {

	public GoodsType queryByName(String name) {
		String hql = "from GoodsType gt where gt.name = '" + name + "'";
		List<GoodsType> goodsTypes = getBaseDao().queryByHql(GoodsType.class, hql);
		if(goodsTypes != null && goodsTypes.size() != 0){
			return goodsTypes.get(0);
		}else{
			return null;
		}
	}

}